(* Copyright (c) xTech 1992,94.  All Rights Reserved *)
<*+ CSTDLIB  *>
<*+ NOHEADER *>
<*+ M2EXTENSIONS *>
DEFINITION MODULE [2] math;

PROCEDURE acos(x: LONGREAL): LONGREAL;
PROCEDURE asin(x: LONGREAL): LONGREAL;
PROCEDURE atan(x: LONGREAL): LONGREAL;
PROCEDURE atan2(y,x: LONGREAL): LONGREAL;
PROCEDURE cos(x: LONGREAL): LONGREAL;
PROCEDURE sin(x: LONGREAL): LONGREAL;
PROCEDURE tan(x: LONGREAL): LONGREAL;

PROCEDURE cosh(x: LONGREAL): LONGREAL;
PROCEDURE sinh(x: LONGREAL): LONGREAL;
PROCEDURE tanh(x: LONGREAL): LONGREAL;

PROCEDURE exp(x: LONGREAL): LONGREAL;
PROCEDURE frexp(x: LONGREAL; VAR exp: INTEGER): LONGREAL;
PROCEDURE ldexp(x: LONGREAL; exp: INTEGER): LONGREAL;
PROCEDURE log(x: LONGREAL): LONGREAL;
PROCEDURE log10(x: LONGREAL): LONGREAL;
PROCEDURE modf(x: LONGREAL; VAR ipart: LONGREAL): LONGREAL;

PROCEDURE pow(x,y: LONGREAL): LONGREAL;
PROCEDURE sqrt(x: LONGREAL): LONGREAL;

PROCEDURE ceil(x: LONGREAL): LONGREAL;
PROCEDURE fabs(x: LONGREAL): LONGREAL;
PROCEDURE floor(x: LONGREAL): LONGREAL;
PROCEDURE fmod(x,y: LONGREAL): LONGREAL;

PROCEDURE hypot(x,y: LONGREAL): LONGREAL;

CONST (* Constants rounded for 18 decimals. *)
  MA_E        = 2.71828182845904524;
  MA_LOG2E    = 1.44269504088896341;
  MA_LOG10E   = 0.434294481903251828;
  MA_LN2      = 0.693147180559945309;
  MA_LN10     = 2.30258509299404568;
  MA_PI       = 3.14159265358979324;
  MA_PI_2     = 1.57079632679489662;
  MA_PI_4     = 0.785398163397448310;
  MA_1_PI     = 0.318309886183790672;
  MA_2_PI     = 0.636619772367581343;
  MA_1_SQRTPI = 0.564189583547756287;
  MA_2_SQRTPI = 1.12837916709551257;
  MA_SQRT2    = 1.41421356237309505;
  MA_SQRT_2   = 0.707106781186547524;

END math.
